package com.wpw.dream.transfer;

import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.Writer;

import javax.xml.parsers.ParserConfigurationException;

import org.apache.pdfbox.pdmodel.PDDocument;
import org.fit.pdfdom.PDFDomTree;

public class Pdf2HtmlTest {
	public static void main(String[] args) throws IOException, ParserConfigurationException {
		PDDocument pdf = PDDocument.load(new File("D:/145810.pdf"));
        Writer output = new PrintWriter("D:/pdf.html", "utf-8");
        PDFDomTree pdfDomTree = new PDFDomTree();
        pdfDomTree.setLineSeparator("");
        
        pdfDomTree.writeText(pdf, output);
        output.close();
	}

}
